//
//  TabBarControllerConfig.m
//  DemoTest
//
//  Created by DaShuEdu on 2017/4/26.
//  Copyright © 2017年 DaShuEdu. All rights reserved.
//

#import "TabBarControllerConfig.h"
#import "TabBarViewController.h"
#import "OneViewController.h"
#import "TwoViewController.h"
#import "ThreeViewController.h"
#import "FourViewController.h"
#import "FiveViewController.h"
#import "TabBarViewController.h"

@implementation TabBarControllerConfig

+ (instancetype)shareInstance {
    static TabBarControllerConfig *shareConfig;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        shareConfig = [[TabBarControllerConfig alloc] init];
    });
    return shareConfig;
}

- (TabBarViewController *)getTabBarController {
    TabBarViewController *tab = [TabBarViewController tabBarControllerShowAddItem:YES withAddChildVCsBlock:^(TabBarViewController *tabBarVC) {
        [tabBarVC addChildVC:[OneViewController new] title:@"One" normalImageName:@"home_normal" selectedImageName:@"home_highlight"];
        [tabBarVC addChildVC:[TwoViewController new] title:@"Two" normalImageName:@"message_normal" selectedImageName:@"message_highlight"];
        [tabBarVC addChildVC:[FiveViewController new] title:@"Five" normalImageName:@"center" selectedImageName:@"center"]; //center
        [tabBarVC addChildVC:[ThreeViewController new] title:@"Three" normalImageName:@"mycity_normal" selectedImageName:@"mycity_highlight"];
        [tabBarVC addChildVC:[FourViewController new] title:@"Four" normalImageName:@"account_normal" selectedImageName:@"account_highlight"];
    } with:^() {
        return CGSizeMake(80, 80); //CGSizeZero;
    } with:^() {
        return @"ju.jpg"; //@"";
    }];
    return tab;
}

@end
